﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Face8280WebSocketServer.DB
{
    [Table("RemoteTask")]
    public class RemoteTaskDetail
    {
        [Key]
        [Required]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int TaskID { get; set; }

        #region 设备信息
        /// <summary>
        /// 设备SN
        /// </summary>
        public int DeviceID { get; set; }
        #endregion


        #region 任务详情
        /// <summary>
        /// 任务类型 ；1，远程开门；2、远程重启；3、恢复出厂设置；4、关闭报警；5、清空所有人员
        /// </summary>
        public int TaskType { get; set; }

        /// <summary>
        /// 上传状态：0--未执行；1--已执行；
        /// </summary>
        public int TaskStatus { get; set; }

        /// <summary>
        /// 任务执行时间
        /// </summary>
        public DateTime TaskRunTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime LastUpdatetime { get; set; }
        #endregion


        public RemoteTaskDetail()
        {
            TaskStatus = 0;
            CreateTime = DateTime.Now;
            TaskRunTime = DateTime.Now;
            LastUpdatetime = DateTime.Now;
        }
    }
}
